﻿@using Projectmanagement.Models
@{
    ViewBag.Title = "Printing";
}
<style type="text/css">
#Printing{margin-top:9px;}
</style>
@(Html.Telerik().Grid<_Printing>()
                    .Name("Printing")
    .DataKeys(keys => { keys.Add(item => item.ID); })
    .ToolBar(toolBar => toolBar.Template(
                @<text> 供应商表： <a class="t-button t-grid-add" href="/Printing?Printing-mode=insert">新增记录</a>
</text>
                ))
        .DataBinding(dataBinding =>
        {
            dataBinding.Ajax()
            .Select("_SelectIndex", "Printing")
            .Insert("_InsertAjaxEditing", "Printing")
            .Update("_SaveAjaxEditing", "Printing")
            .Delete("_DeleteAjaxEditing", "Printing");
        })
            .Columns(columns =>
            {
                columns.Bound(item => item.ComyanyName).Width(80);
                columns.Bound(item => item.ContactName).Width(80);
                columns.Bound(item => item.ContactTitle).Width(80);

                columns.Bound(item => item.ContaceMobile).Width(80);

                columns.Bound(item => item.CardSize).Width(80);
                columns.Bound(item => item.WhiteCardboard).Width(80);
                columns.Bound(item => item.CardAll).Width(80);


                columns.Command(commands =>
                {
                    commands.Edit();
                    commands.Delete();
                }).Title("操作").Width(200);
            }).Resizable(r => r.Columns(true))
            .Editable(editing => editing.Mode(GridEditMode.PopUp))
                .Pageable(item => item.Style(GridPagerStyles.Status).PageSize(50).PageOnScroll(true)).Scrollable(s => s.Height(600)).Scrollable(c => c.Height(600))
    .Resizable(resizing => resizing.Columns(true))
            .Sortable()
        )
<script type="text/javascript">
    function onEdit(e) {
    }
</script>
